﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1.DesignerPatter.Observer
{
    class MainObserver
    {
        public static void Main()
        {
            Boss huHanSan = new Boss();
            huHanSan.SubjectState = "我胡汉三回来了，嘿嘿";
            huHanSan.Attach(new NbaObserver(huHanSan, "李世杰"));
            huHanSan.Attach(new StockObserver(huHanSan, "刘笨"));

            huHanSan.Notify();
            Console.Read();
        }
    }
}
